print("===========一维列表===============")
list1 = [1,3,5,7,9,11]
print(list1)
print(list1[0:3])
print(list1[0:1])
print(list1[:3])
print("==========================")
list2 = ['train','bus','car','ship']
print(list2[1])
print(list2[-1])
print(list2[3])
print("===========二维列表===============")
list3 = [['IBM','Apple','len'],["china","English","USA"]]
print(list3[0][-1])
print(list3[1][2])
print("============修改元素==============")
list4 = ['train','bus','car','ship']
list4[-1] = 'wo'
print(list4)
print("=============切片=============")
list5 = ["1",2,"hello",[1,2,3],"你好"]
print(list5[0:4])
print(list5[0:1])
print(list5[:3])
print(list5[3:])
print(list5[:])
print(list5[-3:-1])
print("=============删除元素=============")
list6 = ["1",2,"hello",[1,2,3],"你好"]
del list6[2]
print("=============列表相加=============")
list7 = list1 + list2
print(list7)
print("=============列表相乘=============")
list8 = list1 * 2
print(list8)
